package wiki.generic.concretecontents;

import java.util.ArrayList;
import java.util.List;

import wiki.generic.contents.Content;

/**
 * 
 * @author <p><strong>JwTeam</strong></p> 
 *
 */
public abstract class ConcreteContent implements Content{

	protected String nome;
	protected String type;
	protected int ID;
	protected List<String> attributes = new ArrayList<String>();

	public ConcreteContent(String nome,String type,int ID, List<String> attributes) {
		this.type=type;
		setAllAttributes(nome,ID, attributes);
	}


	public void setAllAttributes(String nome,int ID, List<String> attributes) {
		this.nome=nome;
		this.ID=ID;
		this.attributes=attributes;
	}

	public List<String> getAttributes(){
		return attributes;
	}
	
	@Override
	public String toString() {
		String s=nome+"$$||$$"+type+"$$||$$"+ID;
		for (int i = 0; i < attributes.size(); i++) {
			s+="$$||$$"+attributes.get(i);
		}
		return s;
	}

	public String getContentName(){
		return this.nome;
	}
	public int getID(){
		return ID;
	}
	
	public String getType(){
		return type;
	}
	
	@Override
	public abstract String getHTMLCode();

	public abstract Content clone();
}